﻿using Microsoft.EntityFrameworkCore;
using PublisherDomain;

namespace PublisherData;

public class PubContext : DbContext
{
    public DbSet<Author> Authors { get; set; }
    public DbSet<Book> Books { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        optionsBuilder.UseSqlServer("""
                                    server=rm-bp1x5on64y488r0vnqo.sqlserver.rds.aliyuncs.com,1433;
                                    user=fengliulin;
                                    password=QQwoaini123;
                                    database=ChenghengTestEFCore;
                                    TrustServerCertificate=True;
                                    """);
    }
}